<template>
	<view class="" :change:optionOrderElId="renderScript.receiveMsg" :optionOrderElId="optionOrderElId">
		<!-- 问诊描述 -->
		<!-- 内容框 -->
		<!-- <view :class="'add-contentPay' + optionOrder.orderId + optionOrder.tabCurrentIndex"></view> -->
		<view class="des"  v-if="optionOrderElId && optionOrderElId.orderId" :id="'add-contentPay' + optionOrderElId.orderId + optionOrderElId.elId"></view>
	</view>
</template>

<script>
import { mapState } from 'vuex';
import pageMixin from '@/mixins/pageMixin';

export default {
	mixins: [pageMixin],
	components: {},
	data() {
		return {
			imgPathOne: "https://res.jiyaqi.com/pet/miniapp/medical/icon4.png",
			optionOrderElId: null
		};
	},
	props: ['optionOrder'],
	mounted() {
		this.optionOrderElId = { ...this.optionOrder, elId: uni.$u.guid(20) };
	},
	computed: {},
	methods: {}
};
</script>

<script module="renderScript" lang="renderjs">
export default {
	data() {
		return {
			showOne: false,

		}
	},
	mounted() {
		// console.log(36, this.optionOrder)

	},
	methods: {
		receiveMsg(newValue, oldValue, ownerVm, vm) {
			// console.log(44,newValue, oldValue, ownerVm, vm)
			this.$nextTick(function() {
				// let content = document.getElementsByClassName('tab-content'+newValue.tabCurrentIndex)[newValue.tabCurrentIndex]
				// let bo = content.getElementsByClassName('add-contentPay'+newValue.orderId +newValue.tabCurrentIndex)[0]; //获取body对象.
				// let addTextStyle = null;
				// if(bo && bo.getElementsByClassName('addTextStyle')[0]){
				// 	addTextStyle =bo.getElementsByClassName('addTextStyle')[0]
				// }

				// let content = document.getElementsByClassName('tab-content' + newValue.tabCurrentIndex)[
				// 	newValue.tabCurrentIndex]
               if(newValue && newValue.orderId && newValue.elId){
				let bo = document.getElementById('add-contentPay' + newValue.orderId + newValue.elId)
				if (bo && bo.innerHTML && bo.innerText) {
					// 有值就不加
				} else {
					// 没值，就追加

					if (newValue && newValue.describe.length > 0 && bo) {

						var div = document.createElement('view');
						div.innerHTML = newValue.describe // 描述的类容
						// console.log(newValue.describe)
						bo.appendChild(div);
						this.showOne = true
					}

				}

			}








			})


		},
	}
};
</script>

<style lang="scss" scoped>
page {
}

.des {
	// background-color: pink;
	// border: 1px solid #65a0fa;
	color: #1a1a1a;
	overflow: auto;
	font-size: 28rpx !important;
	line-height: 44rpx;
	margin: 30rpx 0;
}

.conmmentStly {
	margin-top: 15rpx;
	padding: 20rpx 30rpx;
	background-color: #fff;
}
.ellipsis {
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-all; /*允许在单词内换行,防止有字母时候出问题*/
	display: -webkit-box; /*将对象作为弹性伸缩盒子模型显示*/
	-webkit-line-clamp: 2; /*多行在这里修改数字即可*/
	-webkit-box-orient: vertical; /*从上到下垂直排列子元素*/
}
</style>
